package sush.global.cammail.provider;

import android.util.Log;

public class Scheme {
	public static String AUTHORITY;
	public static final String SCHEME = "content://";
	public static final String DATABASE_NAME = "sush.global.cammail.db";
	public static final int DATABASE_VERSION = 1;
	
	private static TemplateTable _templateTable;
	private static FieldTable _fieldTable;
	private static DropDownValueTable _dropDownValueTable;
	private static TaskTable _taskTable;
	private static TaskImageTable _taskImageTable;
	
	static {
		try {
			AUTHORITY = "sush.global.cammail.db";
					//CammailApplication.getContext().getString(R.string.authority);
		} catch (Exception e) {
			Log.e("SCHEME", "--- Error: " + e.getMessage());
		}
	}
	
	public static TemplateTable getTemplateTable() {
		if(_templateTable == null) {
			_templateTable = new TemplateTable();
		}
		
		return _templateTable;
	}
	
	public static FieldTable getFieldTable() {
		if(_fieldTable == null) {
			_fieldTable = new FieldTable();
		}
		
		return _fieldTable;
	}	
	
	public static DropDownValueTable getDropDownValueTable() {
		if(_dropDownValueTable == null) {
			_dropDownValueTable = new DropDownValueTable();
		}
		
		return _dropDownValueTable;
	}
	
	public static TaskTable getTaskTable() {
		if(_taskTable == null) {
			_taskTable = new TaskTable();
		}
		
		return _taskTable;
	}
	
	public static TaskImageTable getTaskImageTable() {
		if(_taskImageTable == null) {
			_taskImageTable = new TaskImageTable();
		}
		
		return _taskImageTable;
	}
}
